<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:YouVisioTextDiff="clr-namespace:YouVisio.Silverlight.TextDiff">


    <Style TargetType="YouVisioTextDiff:TextDiffViewer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="YouVisioTextDiff:TextDiffViewer">
                    <Grid x:Name="RootGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="50*" />
                            <ColumnDefinition Width="50*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        
                        <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
                            <Button x:Name="TriggerButton" Content="View Difference!" Margin="3 3 16 2" Width="110" />
                            <Button x:Name="File1Button" Content="File 1" Margin="3 3 2 2" Width="90" />
                            <TextBlock x:Name="File1Label" Padding="7" />
                            <Button x:Name="File2Button" Content="File 2" Margin="3 3 2 2" Width="90" />
                            <TextBlock x:Name="File2Label" Padding="7" />
                            <TextBlock x:Name="MessageLabel" Padding="7" Foreground="Red" />
                        </StackPanel>

                        <TextBox x:Name="LeftInput" AcceptsReturn="true" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Grid.Column="0" Grid.Row="1" Margin="5 0 2 5" />
                        <TextBox x:Name="RightInput" AcceptsReturn="true" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Grid.Column="1" Grid.Row="1" Margin="2 0 5 5" />

                        <Grid x:Name="OutputOuterGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="30" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="20" />
                            </Grid.RowDefinitions>

                            <Canvas x:Name="LinesPreviewCanvas" Grid.Column="0" Grid.Row="0" />

                            <ScrollViewer x:Name="OutputScrollViewer" Grid.Column="1" Grid.Row="0">
                                <Grid x:Name="OutputInnerGrid">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="30" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="30" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>

                                    <Canvas x:Name="RectangleCanvas" Margin="4" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" />

                                    <Border Grid.Column="0" Grid.Row="0" Background="White" Padding="1 0 1 0">
                                        <TextBlock x:Name="LeftOutputLineNumbers" Margin="0 4 0 0" TextAlignment="Right" />
                                    </Border>

                                    <YouVisioTextDiff:TextDiffOutputBox x:Name="LeftOutput" IsReadOnly="True" Background="Transparent" TextWrapping="NoWrap" Grid.Column="1" Grid.Row="0"></YouVisioTextDiff:TextDiffOutputBox>
                                    
                                    <Border Grid.Column="2" Grid.Row="0" Background="White" Padding="1 0 1 0">
                                        <TextBlock x:Name="RightOutputLineNumbers" Margin="0 4 0 0" TextAlignment="Right" />
                                    </Border>

                                    <YouVisioTextDiff:TextDiffOutputBox x:Name="RightOutput" IsReadOnly="True" Background="Transparent" TextWrapping="NoWrap" Grid.Column="3" Grid.Row="0"></YouVisioTextDiff:TextDiffOutputBox>

                                </Grid>
                            </ScrollViewer>
                            
                            <ScrollBar x:Name="HorizontalScrollBar" Grid.Column="1" Grid.Row="1" Orientation="Horizontal" />
                        </Grid>

                        <Rectangle x:Name="WaitCursor" Stroke="Transparent" Fill="Transparent" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2" Cursor="Wait" Width="1024" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Collapsed" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
